import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'

//引入第三方字体
import './assets/fonts/iconfont.css'

//引入全局默认样式
import './assets/css/reset.css'

//引入全局面包屑
import breadcrumb from'@/components/Breadcrumb'
Vue.component('breadcrumb',breadcrumb)

Vue.config.productionTip = false

//axios依赖的配置
import axios from "@/utils/request";
Vue.prototype.$http = axios;

//导入vue-quill-editor（富文本编辑器）
import VueQuillEditor from 'vue-quill-editor'
//导入vue-quill-editor的样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

//全局注册富文本组件
Vue.use(VueQuillEditor)

//全局过滤器
Vue.filter('formdata', function (v) {
  const dt = new Date(v)
  let n = dt.getFullYear()
  let y = (dt.getMonth() + 1 + '').padStart(2, '0')
  let r = (dt.getDate() + '').padStart(2, '0')
  let s = (dt.getHours() + '').padStart(2, '0')
  let f = (dt.getMinutes() + '').padStart(2, '0')
  let m = (dt.getSeconds() + '').padStart(2, '0')
  return `${n}-${y}-${r} ${s}:${f}:${m}`
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
